Skip to content

Commit 65d9374

Browse files
committed
remove extraneous connectivity testing
1 parent 5b0fd1c commit 65d9374

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

kitsune/search/es_utils.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,11 @@ def es_client(**kwargs):
102102
# SSL settings - these are needed for ES8 which requires SSL by default
103103
"verify_certs": settings.ES_VERIFY_CERTS,
104104
"ssl_show_warn": settings.ES_SSL_SHOW_WARN,
105-
# Disable auto-discovery which can cause connection issues
106-
"sniff_on_start": settings.ES_SNIFF_ON_START,
107-
"sniff_on_connection_fail": settings.ES_SNIFF_ON_CONNECTION_FAIL,
108105
}
109106

110107
if settings.ES_HTTP_AUTH:
111108
es_settings.update({"basic_auth": settings.ES_HTTP_AUTH})
112109

113-
if settings.TEST:
114-
# In tests, increase timeout and retry settings
115-
es_settings.update(
116-
{
117-
"request_timeout": settings.ES_TIMEOUT * settings.ES_TEST_TIMEOUT_MULTIPLIER,
118-
"max_retries": settings.ES_TEST_MAX_RETRIES,
119-
"retry_on_timeout": settings.ES_RETRY_ON_TIMEOUT,
120-
}
121-
)
122-
123110
kwargs.update(es_settings)
124111

125112
return Elasticsearch(**kwargs)

kitsune/search/tests/test_es_utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,9 @@ def make_first_doc_throw_exception(self, *args, **kwargs):
4848
question = Question.objects.get(id=question_id)
4949
AnswerFactory(question=question, content=f"answer {question_id}")
5050

51-
# Force ES index refresh before testing
52-
QuestionDocument._index.refresh()
53-
5451
with self.assertRaises(BulkIndexError):
5552
index_objects_bulk("QuestionDocument", ids, elastic_chunk_size=1)
5653

57-
# After the exception, verify the document was properly indexed
58-
# Give ES some time to process before checking
59-
QuestionDocument._index.refresh()
60-
6154
try:
6255
QuestionDocument.get(id_without_exception)
6356
except NotFoundError:

0 commit comments

Comments
 (0)